]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
iconGrid: Initialize properties in _init
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 5 Sep 2013 15:59:41 +0000 (17:59 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 5 Sep 2013 16:18:05 +0000 (18:18 +0200)
While this is good style anyway, after the latest appDisplay changes
the first call to get_preferred_height() happens before we properly
compute those properties, resulting in a size request of NaN that
triggers a Clutter warning.

js/ui/iconGrid.js

index 3715044ebfa4dbb0cb6c3711cb54d18d7ccb6ce6..8bcb56d2cf8c1b6102adc9386cec82b1890b3485 100644 (file)
@@ -533,6 +533,9 @@ const PaginatedIconGrid = new Lang.Class({
     _init: function(params) {
         this.parent(params);
         this._nPages = 0;
+        this._rowsPerPage = 0;
+        this._spaceBetweenPages = 0;
+        this._childrenPerPage = 0;
     },
 
     _getPreferredHeight: function (grid, forWidth, alloc) {